package ooday05;

public class EnumDemo {
    public static void main(String[] args) {
        Season s=Season.SPRING;
        System.out.println(s.getSeasonDesc());

       switch (s){
           case SPRING:
               System.out.println("天气"+s.getSeasonDesc()+"，放风筝去了");
               break;
           case SUMMER:
               System.out.println("天气"+s.getSeasonDesc()+"，游泳去了");
               break;
           case AUTUMN:
               System.out.println("天气"+s.getSeasonDesc()+"，郊游去了");
               break;
           case WINTER:
               System.out.println("天气"+s.getSeasonDesc()+"，打雪仗去了");
               break;

       }

        Season[] seasons=Season.values();//获取所有枚举的对象
        for(int i=0;i<seasons.length;i++){
            System.out.println(seasons[i]);
            System.out.println(seasons[i].getSeasonName()+seasons[i].getSeasonDesc());
        }

    }
}
